package com.jc.service.xorderprocess;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import com.jc.cds.model.CustomerXorderProcess;
import com.jc.ds.base.service.BaseServiceImpl;
import com.jc.ds.mapper.BaseCustomMapper;
import com.jc.ds.model.XorderProcess;

@Service
public class XorderProcessServiceImpl extends BaseServiceImpl<XorderProcess, CustomerXorderProcess, Long> implements XorderProcessService {

	@Override
	public BaseCustomMapper<CustomerXorderProcess, Long> getCustomMapper() {
		return null;
	}

	
	public int addXorderProcess(String channelOrderId,String detailDesc,String optionUserName,Long orderId) {
		XorderProcess process = new XorderProcess();
		process.setChannelOrderId(channelOrderId);
		if(StringUtils.isNotBlank(detailDesc)) {
			detailDesc = StringUtils.substring(detailDesc, 0, 800);
		}
		process.setDetailDesc(detailDesc);
		process.setOptionUserName(optionUserName);
		process.setOrderId(orderId);
		process.setProcessCreate(new Date());
		return this.add(process, false);
	}
}
